package com.itheima.test;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;

public class Demo {
    public static void main(String[] args) {
        System.out.println("开始");
        method();
        System.out.println("结束");
        LinkedList<String> list = new LinkedList<>();
        for (int i = 0; i < list.size(); i++) {

        }
        Map<String,String> map = new HashMap<>();
    }

    public static void method() {
        try {
            int[] arr = {1, 2, 3};
            System.out.println(arr[3]);
            System.out.println("这里能够访问到吗");
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("你访问的数组索引不存在，请回去修改为正确的索引");
        }
    }
}

